﻿<style>
    .modal-lg { width: 70%; }
    em{font-style:inherit;}
    .pull-right{font-size: 13px;padding-top: 8px;}
    .loadPaperProgress{height:100%;border-radius:10px;background:#16BEB1;position:absolute;left:0;top:0;font-size:12px;color:#FFF;text-align:center;}
</style>

<div class="modal-header">
    <button type="button" class="close" ng-click="close();">
        <span aria-hidden="true">&times;</span>
    </button>
    <h3 class="modal-title">
        科目列表
        <div class="loadProgress pull-right" style="display:none;">
            <lable>
                <span>下载进度：</span>
                <span style="display: inline-block;width: 100px;height: 15px;border-radius: 10px;background:#f2f2f2;position: relative;vertical-align: sub;">
                    <span id="loadPaperProgress" class="loadPaperProgress"></span>
                </span>
            </lable>
            <lable style="margin-right:25px;">
                <span class="successPaperNum" style="color:#16BEB1;margin-left:15px;">成功：<em>0</em></span>
                <span class="failPaperNum" style="color:red;margin-left:15px;">失败：<em>0</em></span>
                <span class="yuPaperNum" style="margin-left:15px;">剩余：<em>0</em></span>
            </lable>
        </div>
    </h3>
</div>

<div class="modal-body">
    <div style="max-height: 280px; overflow-y: auto;">
        <table class="table responsive table-hover">
            <tbody>
                <tr ng-repeat="item in list.items">
                    <td style="width: 40%;" title="{{item.subjectName}}">{{item.subjectName}}</td>

                    <td style="width: 20%;" class="text-center" ng-switch on="item.subjectPaperStatus">
                        <span ng-switch-when="0">未加载</span>
                        <span ng-switch-when="1" class="text-red">加载完成未生成试卷</span>
                        <span ng-switch-when="2" class="text-success"><i class="fa fa-check"></i>加载完成</span>
                        <span ng-switch-when="3" class="text-red"><i class="fa fa-close"></i>加载失败</span>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <div class="page-list" ng-hide="list.totalPage==1">
        <div style="text-align: right;">
            <nav>
                <ul class="pagination" style="margin-bottom:0;">
                    <li>
                        <a ng-click="Previous()" role="button">
                            <span role="button">上一页</span>
                        </a>
                    </li>
                    <li>
                        <a ng-click="Next()" role="button">
                            <span role="button">下一页</span>
                        </a>
                    </li>
                    <li>
                        <a style="border: none;margin-left: 0px;background: #FFF!important;">
                            第<input type="text" ng-model="currentPage" ng-keyup="selectPage()" style="width:40px;margin-top:-2px;text-align:center;">页
                            共<strong>{{totalPage}}</strong>页
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</div>

<div class="modal-footer">
    <button class="btn btn-gray pull-right" ng-click="close();">
        <i class="fa fa-close"></i>
        关闭
    </button>
    <button class="btn btn-turquoise pull-right loadPaper" ng-disabled="loadingState" ng-click="downloadPaper();" style="margin-right: 20px;">
        <i ng-show="loadingPaper" class="fa fa-spinner fa-spin"></i>
        加载科目
    </button>
    <button class="btn btn-turquoise pull-right reloadPaper" ng-disabled="loadingState" ng-click="downloadPaper();" style="display:none;margin-right: 20px;">
        <i ng-show="loadingPaper" class="fa fa-spinner fa-spin"></i>
        重新加载
    </button>
</div>
